CREATE TABLE [dbo].[TTVEND_TESO]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_VEND] [dbo].[TD_VC_020] NOT NULL,
[NO_VEND] [dbo].[TD_VC_050] NOT NULL,
[AP_PATE_VEND] [dbo].[TD_VC_050] NOT NULL,
[AP_MATE_VEND] [dbo].[TD_VC_050] NOT NULL,
[TI_SITU] [dbo].[TD_VC_003] NOT NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NULL CONSTRAINT [DF__TTVEND_TE__CO_US__33B5855E] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TTVEND_TE__FE_US__34A9A997] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TTVEND_TE__CO_US__359DCDD0] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TTVEND_TE__FE_US__3691F209] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTVEND_TESO] ADD CONSTRAINT [PK__TTVEND_T__53B970DC5A8539BC] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_VEND]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTVEND_TESO] ADD CONSTRAINT [FK__TTVEND_TE__CO_EM__031D3AFB] FOREIGN KEY ([CO_EMPR]) REFERENCES [dbo].[TMPARA_TESO] ([CO_EMPR])
GO
